<template>	
  <view class="products-list">
      <view class="content">
        <block v-for="(product, index) in products" :key="index" >
          <products-list-item-com :product="product" :scrollTop="scrollTop" :isFromHome="isFromHome"></products-list-item-com>
        </block>
        <view class="no-more" v-if="pageHasNoMore">
          --- 没有更多数据了 ---
        </view>
      </view>
  </view>
</template>

<script>
import ProductsListItemCom from "./ProductsListItemCom"

export default {
  name: "ProductsListCom",
  components: {ProductsListItemCom},
  props: {
    products: {
      type: Array,
      default: []
    },
		pageHasNoMore:{
			type:Boolean,
			default:false
		},
		scrollTop:{
			default:0
		},
		isFromHome:{
			default:false
		}
  }
}
</script>

<style lang="scss" scoped>
  .products-list {
    width: 100%;
	max-width:1680px;
	margin:20px auto 0;
    .content {
      display: flex;
      flex-wrap: wrap;
      .no-more {
        width: 100%;
        font-size: 24rpx;
        text-align: center;
        color: #cccccc;
      }
    }
  }
</style>
